home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
other
/
gui4cli
/
dir
/
dir.vsg
< prev
next >
Wrap
Text File
|
1999-05-14
|
3KB
|
141 lines
G4C
; this is a GUI for Visage
WINBIG 404 34 74 66 "Visage"
wintype 11110001 ; a resizable window
; winbackground icon guis:info/bgnds/tile 0
varpath dir.gc
;============================> Some Graphics (to fill in space)
BOX 0 0 159 115 out button
;============================> on loading
xONLOAD ; Set the default values of our vars
; defaults
res = "" ; resolution
lace = "" ; interlace
dtype = "" ; datatypes
time = 0 ; show pics for ever
setgad #this 10 off
guiopen #this
xonclose
guiquit #this
xonfail
guiquit #this
;===================> A cycler for the Resolution Modes
XCYCLER 2 2 70 14 Res. res
CSTR Def ''
CSTR Low 'Low Res'
CSTR High 'High Res'
CSTR "S-Hi" 'Super-High Res'
if $res > ''
setgad #this 10 on
else
setgad #this 10 off
endif
XCHECKBOX 46 17 26 11 Lace lace Laced '' OFF
gadid 10
XCHECKBOX 46 28 26 11 DT dtype DATATYPES "" OFF
gadid 11
XHSLIDER 4 40 43 12 '' time 0 60 0 "%lds"
GadID 12
; ----------------------------------------------------------
; play selection
; ----------------------------------------------------------
XBUTTON 3 53 69 12 PLAY
id = $$LV.ID ; get the listview's id
dir = $$LV.DIR
vsg_end = 0
lvuse dir.gc $id
lvmulti first ; get first file
if $lv_file = ""
ezreq "How's about choosing\nsome files first ?" 'Oh yeah..' ""
stop
endif
cd $dir ; cd to the current directory
; construct line & launch it
gosub #this getfiles
gosub #this makecom
launch 1 'sys:utilities/visage >nil: $files $com'
; say 'sys:utilities/visage >nil: $files $com\n'
xOnReturn 1
if $vsg_end = 1 ; if no more files, we're done..
stop
endif
lvuse dir.gc $id ; it may have been changed..
cd $$lv.dir
lvmulti next
if $lv_file > ""
gosub #this getfiles
gosub #this makecom
launch 1 'sys:utilities/visage >nil: $files $com'
endif
; ----------------------------------------------------------
; routine to collect files (only names since we cd)
; ----------------------------------------------------------
xRoutine getfiles
local counter
counter = 0 ; counter - max = 900/30=30 files
files = "" ; this were we'll put the files
while $counter < 30
and $$lv.line > ''
extract lv_file ext ext
if $ext == .info
;
else
extract lv_file file file
appvar files ' $file'
++counter
; lvmulti off
endif
lvmulti next
endwhile
if $$lv.line = ''
vsg_end = 1 ; flag end of files
endif
; ----------------------------------------------------------
; countrust rest of command line
; ----------------------------------------------------------
xRoutine makecom
com = ''
if $res > ''
com = 'mode=\"PAL:$res'
if $lace > ''
appvar com ' $lace'
endif
appvar com '"'
endif
if $dtype > ''
appvar com ' DATATYPES'
endif
if $time > 0
appvar com ' DELAY=$time'
endif
appvar com ' CENTER BB=ON'